import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      component:()=>import('../views/layout/index.vue'),
      redirect:'/index',
      children:[
        {path:'/index',
          component:()=>import('../views/index/index.vue')
        },
        {path:'/dept',
          component:()=>import('../views/dept/index.vue')
        },
        {path:'/emp',
          component:()=>import('../views/emp/index.vue')
        },
        {path:'/clazz',
          component:()=>import('../views/clazz/index.vue')
        },
        {path:'/stu',
          component:()=>import('../views/stu/index.vue')
        },
        {
          path:'/report/emp',
          component:()=>import('../views/report/index.vue')
        }
      ]
    },
    {path:'/login',component:()=>import('../views/login/index.vue')}
  ],
})

export default router
